<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class UserChange extends Model
{
    protected $table='users';
    protected $primaryKey='uid';
    protected $fillable=['uid','uname','gender','telphone','birthday','email'];
    public $timestamps = false;

    public function rules()
    {
        return [
            'uname'=>'required|max:8',
        ];
    }

    public function msg(){
        return [
            'uname.unique'=>'用户名名已存在',
            'uname.max'=>'可输入最大长度为12',
            'uname.min'=>'可输入最大长度为8',
            'uname.required'=>'用户名不能为空',
        ];
    }
}
